package com.micro.ai.models.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 模型类型实体类
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@TableName("model_types")
@Schema(description = "模型类型信息")
public class ModelType implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "类型ID", example = "type_123456789")
    private String id;

    /**
     * 租户ID
     */
    @Schema(description = "租户ID", example = "tenant_001")
    private String tenantId;

    /**
     * 类型名称
     */
    @Schema(description = "类型名称", example = "文本生成")
    private String typeName;

    /**
     * 类型代码
     */
    @Schema(description = "类型代码", example = "text_generation")
    private String typeCode;

    /**
     * 能力描述（JSON）
     */
    @Schema(description = "能力描述（JSON格式）", example = "{\"languages\":[\"中文\",\"英文\"],\"maxTokens\":4096}")
    private String capabilities;

    /**
     * 描述
     */
    @Schema(description = "描述", example = "文本生成类型的模型，支持各种文本创作任务")
    private String description;

    /**
     * 类型图标URL
     */
    @Schema(description = "类型图标URL", example = "https://example.com/icon.png")
    private String iconUrl;

    /**
     * 排序
     */
    @Schema(description = "排序", example = "1")
    private Integer sortOrder;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间", example = "2025-01-01 00:00:00")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间", example = "2025-01-01 00:00:00")
    private LocalDateTime updatedAt;
}
